// 定义常用变量
@primary-color: #007fff;
@header-gradient: linear-gradient(189deg, #0033d6, #215ae4, #277ff2, #18a4ff);
@background-color: #f5f5f5;
@popup-background: rgba(0, 0, 0, 0.3);
@border-radius: 4px;
@bottom-nav-height: 50px; // 新增：底部导航高度

.home {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding-top: 80px;
  padding-bottom: @bottom-nav-height;

  .header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background-image: @header-gradient;
    color: #fff;
    font-size: 14px;
    z-index: 100;
    padding: 10px;
    box-sizing: border-box;

    .dataSearch {
      display: flex;
      align-items: center;
      padding: 10px;

      .searchInput {
        width: 100%;
        height: 30px;
        border: none;
        border-radius: @border-radius;
        padding: 0 10px;
        font-size: 14px;
        background-color: rgba(255, 255, 255, 0.2);
        color: #fff;

        &::placeholder {
          color: rgba(255, 255, 255, 0.6);
        }

        &:hover {
          background-color: rgba(255, 255, 255, 0.3);
        }
      }
    }

    .typeWrap {
      display: flex;
      justify-content: space-between;
      align-items: center;

      .left, .right {
        display: flex;
        align-items: center;

        span {
          cursor: pointer;
          display: flex;
          align-items: center;

          .arrow {
            margin-left: 5px;
            font-size: 12px;
          }

          &:hover {
            color: lighten(#fff, 20%);
          }
        }
      }
    }
  }

  .popupType, .popupDate, .addBillPopup {
    position: fixed;
    left: 0;
    top: 80px;
    right: 0;
    bottom: 0;
    background-color: @popup-background;
    z-index: 100;

    .popupBody {
      position: absolute;
      top: 20px;
      left: 50%;
      transform: translateX(-50%);
      width: 90%;
      max-width: 400px;
      background-color: #fff;
      border-radius: @border-radius;
      padding: 10px;

      .popupHeader {
        text-align: center;
        font-size: 14px;
        margin-bottom: 10px;
      }

      .popupClose {
        position: absolute;
        right: 10px;
        top: 10px;
        cursor: pointer;

        &:hover {
          color: @primary-color;
        }
      }

      .popupContent {
        .typeList, .yearList, .monthList {
          display: flex;
          flex-wrap: wrap;
          gap: 10px;

          div {
            cursor: pointer;
            padding: 10px;
            border-radius: @border-radius;
            text-align: center;

            &.active {
              background-color: @primary-color;
              color: #fff;
            }

            &:hover {
              background-color: lighten(@primary-color, 20%);
            }
          }
        }
        .formItem {
          margin-bottom: 10px;
          label {
            display: block;
            margin-bottom: 5px;
          }
          input, select, textarea {
            width: 100%;
            padding: 8px;
            border: 1px solid #ccc;
            border-radius: @border-radius;
          }
        }
        .submitButton {
          width: 100%;
          padding: 10px;
          background-color: @primary-color;
          color: #fff;
          border: none;
          border-radius: @border-radius;
          cursor: pointer;
          &:hover {
            background-color: darken(@primary-color, 10%);
          }
        }
      }
    }
  }

  .contentWrap {
    height: calc(100% - 30px);
    overflow-y: auto;
    background-color: @background-color;
    padding: 10px;
  }

  .addBillButton {
    position: fixed;
    right: 20px;
    bottom: calc(@bottom-nav-height + 20px); /* 修改：调整底部距离 */
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: @primary-color;
    color: #fff;
    border: none;
    font-size: 20px; /* 调整字体大小 */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    
  
    &:hover {
      background-color: darken(@primary-color, 10%);
    }
  }
}